Technical Field
The present invention relates to a computer system, and more specifically relates to generation of a date and time format in a computer system.
Description of the Related Art
Recent years have seen increasing use of stream processing which is a data processing technique of processing, in real time, sequentially arriving data in time order (stream data). In addition to real time processing, stream processing is expected to be applied to a high-speed data-transformation process for large amounts of data, which is a process conventionally treated as ETL (Extract/Transform/Load). In this case, a processing speed on a per-core basis is particularly an important index. As a software platform for performing stream processing, for example, IBM® InfoSphere® Streams is available, and SPL (IBM® Streams Processing Language) is available on IBM® InfoSphere® Streams.
In stream processing, each processed data is sent by a chunk of data, which is called tuple in SPL, and date and time format conversion for the data on tuples is a frequently used conversion process. A converted date and time format is typically generated using a standard function based on UNIX® Time (hereafter referred to as UT). In the case where processing at a per-second rate on a per-core basis exceeding 10,000 tuples is required, however, the processing speed of existing standard functions causes a decrease in performance.
Data representing a date and time is very important data in business logic. Therefore, it is much more desirable to generate a date and time format using a standard function, than to simply implement a custom function and generate a date and time format using the custom function.
Known examples of such a standard function include the gmtime( ) and ctime( ) functions in Linux® and the time( ) function in SPL. The time function in SPL is convenient in that timezone can be designated as an argument. Generating a date and time format from a UT value using such functions is not very lightweight because leap years need to be taken into account. The process becomes heavier when timezone is taken into account. Calling such a standard function very frequently in stream processing causes a significant processing cost, which leads to a decrease in processing speed.
This raises demand to make a date and time format generation process more lightweight while using a standard function. The techniques described in the following Japanese Unexamined Patent Publications are known as conventional techniques relating to date and time format generation.
Japanese Unexamined Patent Publication No. H7-152735 discloses a time data processor including: storage means for storing logical time data composed of fields including a date, a time, an attribute, and a character string; input means for inputting time data of a character string as logical time data; time evaluation means for evaluating the logical time data and executing an operation for the time data; and display control means for outputting and displaying the logical time data in a predetermined expression format based on format information.
Japanese Unexamined Patent Publication No. 2002-140238 discloses the following technique. A client PC is connected to a server via a communication line and references to data in a database. At this point, the client PC obtains the server time by executing a function of a form by a web browser, obtains its own local time by JavaScript, and determines their time difference. Time data is corrected based on the determined difference.
However, the above-mentioned conventional techniques fail to suggest a technique for making a date and time format generation process more lightweight.